package net.pm.core.entities.db;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import net.pm.core.entities.PMCommandEntity;


/**
 * The persistent class for the guestinfo database table.
 * 客户信息
 */
@Entity
@Table(name="Guestinfo")
public class Guestinfo extends PMCommandEntity<Guestinfo>{
	/**
	 * 
	 */
	private static final long serialVersionUID = -4970316897155322127L;
	private Long id;
	private String guestAddr;
	private String guestEmail;
	private String guestName;
	private String guestPhone;
	private Short guestSex;
	private String remark;
	private City city;
	private District district;
	private Province province;

	
	
	public static final Short GUESTSEX_FEMALE = Short.valueOf("0");		//女
	public static final Short GUESTSEX_MALE = Short.valueOf("1");		//男
	
    public Guestinfo() {
    }


	public Guestinfo(Long id) {
		super();
		this.id = id;
	}



	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name="guestAddr")
	public String getGuestAddr() {
		return this.guestAddr;
	}

	public void setGuestAddr(String guestAddr) {
		this.guestAddr = guestAddr;
	}

	@Column(name="guestEmail")
	public String getGuestEmail() {
		return this.guestEmail;
	}

	public void setGuestEmail(String guestEmail) {
		this.guestEmail = guestEmail;
	}

	@Column(name="guestName")
	public String getGuestName() {
		return this.guestName;
	}

	public void setGuestName(String guestName) {
		this.guestName = guestName;
	}

	@Column(name="guestPhone")
	public String getGuestPhone() {
		return this.guestPhone;
	}

	public void setGuestPhone(String guestPhone) {
		this.guestPhone = guestPhone;
	}

	
	@Column(name="guestSex")
	public Short getGuestSex() {
		return this.guestSex;
	}

	public void setGuestSex(Short guestSex) {
		this.guestSex = guestSex;
	}

	@Column(name="remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}


	//bi-directional many-to-one association to City
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="CityId")
	public City getCity() {
		return this.city;
	}

	public void setCity(City city) {
		this.city = city;
	}
	

	//bi-directional many-to-one association to District
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="DistrictId")
	public District getDistrict() {
		return this.district;
	}

	public void setDistrict(District district) {
		this.district = district;
	}
	

	//bi-directional many-to-one association to Province
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="ProvinceId")
	public Province getProvince() {
		return this.province;
	}

	public void setProvince(Province province) {
		this.province = province;
	}


	@Override
	public int compareTo(Guestinfo o) {
		// TODO Auto-generated method stub
		return 0;
	}
	
}